From f3142ff5609694aaf9d4760c605fa0d4b4972c1a Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Mon, 23 Oct 2023 11:03:53 +0200 Subject: [PATCH] Rebase patches --- .../patches/0008-Add-Debian-build-flags.patch | 25 ----- debian/patches/831.patch | 65 ------------- .../gpsbabelfe_do-not-check-for-newer-version | 6 +- debian/patches/htmldoc-location | 96 +++++++++++++++---- debian/patches/series | 2 - 5 files changed, 81 insertions(+), 113 deletions(-) delete mode 100644 debian/patches/0008-Add-Debian-build-flags.patch delete mode 100644 debian/patches/831.patch diff --git a/debian/patches/0008-Add-Debian-build-flags.patch b/debian/patches/0008-Add-Debian-build-flags.patch deleted file mode 100644 index 83345bb21..000000000 --- a/debian/patches/0008-Add-Debian-build-flags.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Jochen Sprickerhof -Date: Sun, 23 Jan 2022 22:54:24 +0100 -Subject: Add Debian build flags - ---- - gui/app.pro | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/gui/app.pro b/gui/app.pro -index 81385bf..d4c1ef1 100755 ---- a/gui/app.pro -+++ b/gui/app.pro -@@ -49,6 +49,12 @@ win32-g++ { - QMAKE_LFLAGS_RELEASE += -static-libgcc - } - -+QMAKE_CPPFLAGS *= $(shell dpkg-buildflags --get CPPFLAGS) -+QMAKE_CFLAGS *= $(shell dpkg-buildflags --get CFLAGS) -+QMAKE_CXXFLAGS *= $(shell dpkg-buildflags --get CXXFLAGS) -+QMAKE_CXXFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) -+QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS) -+ - # Set QMAKE_TARGET_BUNDLE_PREFIX so we get the correct CFBundleIdentifier in Info.plist - darwin:QMAKE_TARGET_BUNDLE_PREFIX=org.gpsbabel - diff --git a/debian/patches/831.patch b/debian/patches/831.patch deleted file mode 100644 index 1ec990f57..000000000 --- a/debian/patches/831.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 60e66d61b2cb9d238f0f6b1088ad7b78f4bc538b Mon Sep 17 00:00:00 2001 -From: tsteven4 <13596209+tsteven4@users.noreply.github.com> -Date: Mon, 24 Jan 2022 07:09:25 -0700 -Subject: [PATCH] simpify unix world conditionals in qmake files. - ---- - GPSBabel.pro | 4 ++-- - libusb.pri | 10 +++++----- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/GPSBabel.pro b/GPSBabel.pro -index 98b25c7d2..0ee8522d8 100644 ---- a/GPSBabel.pro -+++ b/GPSBabel.pro -@@ -281,7 +281,7 @@ HEADERS += $$FILTER_HEADERS - - CONFIG(release, debug|release): DEFINES *= NDEBUG - --macx|linux|openbsd { -+unix { - if (equals(MAKEFILE_GENERATOR, XCODE)) { - # "Configure tests are not supported with the XCODE Makefile generator" - # assume we have the following headers -@@ -354,7 +354,7 @@ QMAKE_EXTRA_TARGETS += check-vtesto - QMAKE_CLEAN += $${OUT_PWD}/testo.d/*.vglog - - # build the compilation data base used by clang tools including clang-tidy. --macx|linux|openbsd{ -+unix { - compile_command_database.target = compile_commands.json - compile_command_database.commands = $(MAKE) clean; bear $(MAKE) - QMAKE_EXTRA_TARGETS += compile_command_database -diff --git a/libusb.pri b/libusb.pri -index a6604f94b..9d589001f 100644 ---- a/libusb.pri -+++ b/libusb.pri -@@ -1,7 +1,7 @@ --macx|linux|openbsd { -+unix { - !defined(WITH_LIBUSB, var) { -- macx: WITH_LIBUSB = included -- linux|openbsd: WITH_LIBUSB = system -+ mac: WITH_LIBUSB = included -+ !mac: WITH_LIBUSB = system - } - equals(WITH_LIBUSB, no) { - message("libusb-1.0 disabled") -@@ -14,7 +14,7 @@ macx|linux|openbsd { - PKGCONFIG += libusb-1.0 - DEFINES += LIBUSB_H_INCLUDE=$$shell_quote() - } else { -- linux|openbsd { -+ !mac { - equals(WITH_LIBUSB, system) { - LIBS += "-lusb-1.0" - DEFINES += LIBUSB_H_INCLUDE=$$shell_quote() -@@ -27,7 +27,7 @@ macx|linux|openbsd { - } - } - -- macx { -+ mac { - equals(WITH_LIBUSB, included) { - # TODO: It would be better to create an archive and link to it - # to separate library build requirements from gpsbabel requirements. diff --git a/debian/patches/gpsbabelfe_do-not-check-for-newer-version b/debian/patches/gpsbabelfe_do-not-check-for-newer-version index 2d4ec51d8..3cc0a0e56 100644 --- a/debian/patches/gpsbabelfe_do-not-check-for-newer-version +++ b/debian/patches/gpsbabelfe_do-not-check-for-newer-version @@ -69,7 +69,7 @@ Disable check for newer versions on start. Visit Website... --- a/gui/mainwindow.cc +++ b/gui/mainwindow.cc -@@ -176,7 +176,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) +@@ -175,7 +175,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) connect(ui_.actionAbout, &QAction::triggered, this, &MainWindow::aboutActionX); connect(ui_.actionVisit_Website, &QAction::triggered, this, &MainWindow::visitWebsiteActionX); connect(ui_.actionMake_a_Donation, &QAction::triggered, this, &MainWindow::donateActionX); @@ -77,7 +77,7 @@ Disable check for newer versions on start. connect(ui_.actionPreferences, &QAction::triggered, this, &MainWindow::preferencesActionX); // TODO: Qt6 deleted the obsolete overloaded signal QComboBox::currentIndexChanged(const QString &text) -@@ -233,17 +232,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) +@@ -232,17 +231,6 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) restoreSettings(); upgrade = new UpgradeCheck(this, formatList_, babelData_); @@ -95,7 +95,7 @@ Disable check for newer versions on start. } //------------------------------------------------------------------------ -@@ -1007,10 +995,6 @@ void MainWindow::applyActionX() +@@ -1010,10 +998,6 @@ void MainWindow::applyActionX() //------------------------------------------------------------------------ void MainWindow::closeActionX() { diff --git a/debian/patches/htmldoc-location b/debian/patches/htmldoc-location index c20163c9a..630560788 100644 --- a/debian/patches/htmldoc-location +++ b/debian/patches/htmldoc-location @@ -1,11 +1,29 @@ ---- a/gbversion.h.qmake.in -+++ b/gbversion.h.qmake.in -@@ -14,5 +14,5 @@ - #else - #define VERSION \"$${GB.MAJOR}.$${GB.MINOR}.$${GB.MICRO}$${GB.PACKAGE_RELEASE}\" - constexpr char kVersionSHA[] = \"$${GB.SHA}\"; --#define WEB_DOC_DIR \"https://www.gpsbabel.org/htmldoc-$${DOCVERSION}\" -+#define WEB_DOC_DIR \"file:///usr/share/doc/gpsbabel/html\" +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -475,8 +475,6 @@ if(UNIX AND NOT APPLE) + USES_TERMINAL) + endif() + +-get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +-if((CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) AND NOT _isMultiConfig) + set(GPSBABEL_WEB "gpsbabel.org" CACHE PATH "Path where the documentation will be stored for www.gpsbabel.org.") + add_custom_target(gpsbabel.org + ${CMAKE_SOURCE_DIR}/tools/make_gpsbabel_org.sh ${GPSBABEL_WEB} ${GPSBABEL_DOCVERSION} +@@ -495,6 +493,3 @@ if((CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) AND NOT _isMultiConfig) + DEPENDS gpsbabel + VERBATIM + USES_TERMINAL) +-else() +- message(WARNING "Document generation is only supported for in-source builds with single configuration generators.") +-endif() +--- a/gbversion.h.in ++++ b/gbversion.h.in +@@ -16,5 +16,5 @@ + #define VERSION "@GB.MAJOR@.@GB.MINOR@.@GB.MICRO@@GB.PACKAGE_RELEASE@" + constexpr char kVersionSHA[] = "@GB.SHA@"; + constexpr char kVersionDate[] = "@GB.DATE@"; +-#define WEB_DOC_DIR "https://www.gpsbabel.org/htmldoc-@GPSBABEL_DOCVERSION@" ++#define WEB_DOC_DIR "file:///usr/share/doc/gpsbabel/html" #endif --- a/testo.d/serialization.test +++ b/testo.d/serialization.test @@ -27,28 +45,59 @@ compare_nole ${REFERENCE}/filter1.txt ${TMPDIR}/filter1.fiddled.txt gpsbabel -%0 > ${TMPDIR}/filter0.txt compare_nole ${REFERENCE}/filter0.txt ${TMPDIR}/filter0.txt +--- a/tools/make_gpsbabel_doc.sh ++++ b/tools/make_gpsbabel_doc.sh +@@ -1,8 +1,8 @@ + #!/bin/sh + set -ex + +-perl xmldoc/makedoc +-xmllint --noout --relaxng http://docbook.org/xml/5.0/rng/docbook.rng xmldoc/readme.xml ++perl ../xmldoc/makedoc ++xmllint --noout --relaxng /usr/share/xml/docbook/stylesheet/docbook-xsl/slides/schema/relaxng/docbook.rng ../xmldoc/readme.xml + # the following doesn't seem to work. + #xmllint --noout --schematron http://docbook.org/xml/5.0/sch/docbook.sch xmldoc/readme.xml + # jing and many depedencies removed from fedora --- a/tools/make_gpsbabel_org.sh +++ b/tools/make_gpsbabel_org.sh -@@ -4,15 +4,12 @@ set -ex - web=$1 - docversion=$2 +@@ -5,13 +5,10 @@ web=${1:-gpsbabel.org} + docversion=${2:-x.y.z} + tooldir=$(cd "$(dirname "$0")" && pwd) -mkdir -p "${web}/htmldoc-${docversion}" +mkdir -p "html" - perl xmldoc/makedoc - xmlwf xmldoc/readme.xml #check for well-formedness - xmllint --noout --valid xmldoc/readme.xml #validate + "$tooldir"/make_gpsbabel_doc.sh xsltproc \ - --stringparam base.dir "${web}/htmldoc-${docversion}/" \ + --stringparam base.dir "html" \ --stringparam root.filename "index" \ - xmldoc/babelmain.xsl \ - xmldoc/readme.xml --tools/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:" --tools/mkcapabilities "${web}" "${web}/htmldoc-${docversion}" +- xmldoc/babelmain.xsl \ +- xmldoc/readme.xml +-"${tooldir}"/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:" +-"${tooldir}"/mkcapabilities "${web}" "${web}/htmldoc-${docversion}" -cp gpsbabel.pdf "${web}/htmldoc-${docversion}/gpsbabel-${docversion}.pdf" ++ ../xmldoc/babelmain.xsl \ ++ ../xmldoc/readme.xml +--- a/tools/make_gpsbabel_pdf.sh ++++ b/tools/make_gpsbabel_pdf.sh +@@ -4,5 +4,5 @@ set -ex + tooldir=$(cd "$(dirname "$0")" && pwd) + + "$tooldir"/make_gpsbabel_doc.sh +-xsltproc -o gpsbabel.fo xmldoc/babelpdf.xsl xmldoc/readme.xml ++xsltproc -o gpsbabel.fo ../xmldoc/babelpdf.xsl ../xmldoc/readme.xml + HOME=. fop -q -fo gpsbabel.fo -pdf gpsbabel.pdf --- a/xmldoc/babelmain.xsl +++ b/xmldoc/babelmain.xsl +@@ -4,7 +4,7 @@ + exclude-result-prefixes="exsl"> + + +- ++ + + 1 + 1 @@ -45,13 +45,11 @@ @@ -71,6 +120,17 @@ +--- a/xmldoc/babelpdf.xsl ++++ b/xmldoc/babelpdf.xsl +@@ -6,7 +6,7 @@ + exclude-result-prefixes="exsl"> + + +- ++ + +